.SUFFIXES: .F
#FC =  /export/mvapich/gnu/bin/mpif90
#FC = /opt/mvapich/pgi/bin/mpif90
#
#FC = /opt/mpich-1.2.6-intel/bin/mpif90
#FC = mpif90
#FC = /opt/mpich2-gnu/bin/mpif90-gnu
#FC = /opt/mpich-1.2.6/bin/mpif90
#FC = /opt/mpich/bin/mpif90
#FC =  /opt/mpich2/intel/11.1/bin/mpif90
#FC =  /opt/pgi/linux86-64/10.5/bin/pgf90
#FC = /opt/mpich2/intel/11.1/bin/mpif90 
#FC = /opt/intel/composer_xe_2013.1.117/bin/intel64/ifort
#CC = /opt/intel/composer_xe_2013.1.117/bin/intel64/icc
FC = /opt/mpich2/intel/13.0/bin/mpif90
CC = /opt/mpich2/intel/13.0/bin/mpicc
#
#FC = /opt/ompi/intel/13.0/bin/mpif90
#CC = /opt/ompi/intel/13.0/bin/mpicc
#/opt/mpich2/intel/13.0/bin/mpiexec   -port 12345  -np 16  -machinefile  ./machines sleep 1
#CC = /opt/mpich2/intel/11.1/bin/mpicc
FFLAGS = -O3 -mavx -xHost -ipo #-i-static
#FFLAGS =  -static #-Wl,--rpath=/usr/opt/intel/fce/9.0/lib/
#FFLAGS = -Bstatic # -Mextend 
CPP = /lib/cpp -P  -C -traditional
CPPFLAGS = 
#UNCOMMENT FOR PARALLEL VERSION
#CPPFLAGS = 
CPPFLAGS = -DMPI
LIBS =  # -L/opt/intel/fce/9.0/lib/ -llibimf
LIBS =  #-lguide -L/lib -lpthread # -L/opt/intel/fce/9.0/lib/ -llibimf
PROG = main

OBJ = main.o lib_four.o lib_init.o lib_math.o lib_qmc.o 

all: $(PROG)

clobber:
	rm -f *.o 

clean:clobber
	rm -f main 

cleanall:clobber
	rm  *.f main

$(PROG): $(OBJ)
	$(FC) $(FFLAGS) -o $(PROG) $(OBJ) $(LIBS)

.F.o:
	$(CPP) $(CPPFLAGS) $< $*.f 
	$(FC) $(FFLAGS) -c  $*.f

.c.o : 
	$(CC) -O2  -c  $<
